package com.songdehuai.supermarket.config;

/**
 * 描述：用于存放各个接口地址
 *
 * @author songdehuai
 * @ClassName: com.songdehuai.supermarket.config.
 * @date 2018/6/26 上午10:00
 */
public class Apis {


    //经度42.8892787,纬度129.5054806 ,
    private final static String longitude = "42.891293";
    private final static String latitude = "129.509731";

    private static final String sid = "f6e9fbf6-7900-11e8-8b71-00163e0637ef";

    /**
     * Base地址，一般用于定义域名、端口等前缀固定地址
     */
    private static final String BASE_URL = "https://www.gonghuijia.cn/app_union/catalog/";

    /**
     * 接口版本
     */
    private static final String VSERSION = "v1/";
    /**
     * 超市列表接口
     */
    public static final String SHOP = BASE_URL + VSERSION + "store/shop/convenience.php?appname=ybu&sid=" + sid + "&citycode=222401&lat=" + latitude + "&long=" + longitude + "&size=10&page=1";

    /**
     * 商品列表接口
     *
     * @param shopId
     * @return
     */
    public static final String SHOP_GOODS(String shopId) {
        String startUrl = "store/shop/conveniencedesc.php?appname=ybu&sid=" + sid + "&shopid=";
        String endUrl = "&lat=" + latitude + "&long=" + longitude;
        return BASE_URL + VSERSION + startUrl + shopId + endUrl;
    }
}
